// MCPStore Vue Frontend - Global Styles
// 基于 vue-element-admin 设计系统的现代化全局样式

// 导入变量和混入
@import './variables.scss';

// 全局重置 - 现代化的重置策略
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 14px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-family-sans);
  font-weight: var(--font-weight-normal);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--text-primary);
  background-color: var(--bg-color-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

// 根容器样式
#app {
  height: 100vh;
  overflow: hidden;
}

// 滚动条样式 - 统一的设计风格
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-color-secondary);
  border-radius: var(--border-radius-sm);
}

::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: var(--border-radius-sm);
  transition: background-color var(--transition-fast);
  
  &:hover {
    background: var(--border-emphasis);
  }
}

::-webkit-scrollbar-corner {
  background: var(--bg-color-secondary);
}

// 链接样式 - 统一的交互效果
a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition-fast);
  outline: none;
  
  &:hover {
    color: var(--primary-light);
    text-decoration: underline;
  }
  
  &:active {
    color: var(--primary-dark);
  }
  
  &:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 2px;
  }
}

// 标题系统 - 专业的层次结构
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--spacing-6) 0;
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-snug);
  color: var(--text-primary);
  letter-spacing: -0.025em;
}

h1 { 
  font-size: var(--font-size-4xl); 
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--spacing-8);
}

h2 { 
  font-size: var(--font-size-3xl); 
  margin-bottom: var(--spacing-7);
}

h3 { 
  font-size: var(--font-size-2xl); 
  margin-bottom: var(--spacing-6);
}

h4 { 
  font-size: var(--font-size-xl); 
  margin-bottom: var(--spacing-5);
}

h5 { 
  font-size: var(--font-size-lg); 
  margin-bottom: var(--spacing-4);
}

h6 { 
  font-size: var(--font-size-md); 
  margin-bottom: var(--spacing-3);
}

// 段落和文本
p {
  margin: 0 0 var(--spacing-6) 0;
  line-height: var(--line-height-relaxed);
  color: var(--text-regular);
  
  &:last-child {
    margin-bottom: 0;
  }
}

// 列表样式
ul, ol {
  margin: 0 0 var(--spacing-6) 0;
  padding-left: var(--spacing-8);
  
  &:last-child {
    margin-bottom: 0;
  }
}

li {
  margin-bottom: var(--spacing-2);
  line-height: var(--line-height-relaxed);
  
  &:last-child {
    margin-bottom: 0;
  }
}

// 代码样式 - 现代化的代码显示
code {
  padding: 2px 6px;
  font-size: 0.875em;
  font-family: var(--font-family-mono);
  color: var(--danger-color);
  background-color: var(--danger-lighter);
  border: 1px solid var(--danger-light);
  border-radius: var(--border-radius-sm);
  white-space: nowrap;
}

pre {
  padding: var(--spacing-6);
  margin: var(--spacing-6) 0;
  background-color: var(--bg-color-tertiary);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-md);
  overflow-x: auto;
  font-family: var(--font-family-mono);
  font-size: 0.875em;
  line-height: var(--line-height-snug);
  
  code {
    padding: 0;
    background: none;
    border: none;
    color: inherit;
    white-space: pre;
  }
}

// 引用样式
blockquote {
  margin: var(--spacing-6) 0;
  padding: var(--spacing-6) var(--spacing-8);
  border-left: 4px solid var(--primary-color);
  background-color: var(--primary-lightest);
  border-radius: 0 var(--border-radius-md) var(--border-radius-md) 0;
  color: var(--text-regular);
  font-style: italic;
}

// 表格样式 - 专业的表格设计
table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  margin: var(--spacing-6) 0;
  background-color: var(--bg-color);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}

th, td {
  padding: var(--spacing-4) var(--spacing-6);
  text-align: left;
  border-bottom: 1px solid var(--border-lighter);
}

th {
  font-weight: var(--font-weight-semibold);
  background-color: var(--bg-color-secondary);
  color: var(--text-primary);
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

td {
  color: var(--text-regular);
}

tr:hover {
  background-color: var(--bg-color-secondary);
}

// 表单元素样式
input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}

// 按钮重置
button {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  
  &:focus {
    outline: none;
  }
}

// 图片样式
img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--border-radius-md);
}

// HR 分割线
hr {
  border: none;
  border-top: 1px solid var(--border-lighter);
  margin: var(--spacing-8) 0;
}

// 焦点样式 - 统一的无障碍设计
*:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
  border-radius: 2px;
}

// 选择文本样式
::selection {
  background-color: var(--primary-color);
  color: var(--text-inverse);
}

// 占位符样式
::placeholder {
  color: var(--text-placeholder);
  opacity: 1;
}

// 文本对齐工具类
.text-left { text-align: left !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }
.text-justify { text-align: justify !important; }
.text-start { text-align: start !important; }
.text-end { text-align: end !important; }

// 文本颜色工具类
.text-primary { color: var(--primary-color) !important; }
.text-success { color: var(--success-color) !important; }
.text-warning { color: var(--warning-color) !important; }
.text-danger { color: var(--danger-color) !important; }
.text-info { color: var(--info-color) !important; }

.text-regular { color: var(--text-regular) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-placeholder { color: var(--text-placeholder) !important; }
.text-inverse { color: var(--text-inverse) !important; }

// 背景颜色工具类
.bg-primary { background-color: var(--primary-color) !important; }
.bg-success { background-color: var(--success-color) !important; }
.bg-warning { background-color: var(--warning-color) !important; }
.bg-danger { background-color: var(--danger-color) !important; }
.bg-info { background-color: var(--info-color) !important; }

.bg-color { background-color: var(--bg-color) !important; }
.bg-color-page { background-color: var(--bg-color-page) !important; }
.bg-color-secondary { background-color: var(--bg-color-secondary) !important; }
.bg-color-tertiary { background-color: var(--bg-color-tertiary) !important; }

// 间距工具类 - 基于 8px 网格系统
@each $size, $value in (0, 0), (1, 4px), (2, 8px), (3, 12px), (4, 16px), (5, 20px), (6, 24px), (8, 32px), (10, 40px), (12, 48px), (16, 64px) {
  // Margin
  .m-#{$size} { margin: $value !important; }
  .mt-#{$size} { margin-top: $value !important; }
  .mr-#{$size} { margin-right: $value !important; }
  .mb-#{$size} { margin-bottom: $value !important; }
  .ml-#{$size} { margin-left: $value !important; }
  .mx-#{$size} { margin-left: $value !important; margin-right: $value !important; }
  .my-#{$size} { margin-top: $value !important; margin-bottom: $value !important; }
  
  // Padding
  .p-#{$size} { padding: $value !important; }
  .pt-#{$size} { padding-top: $value !important; }
  .pr-#{$size} { padding-right: $value !important; }
  .pb-#{$size} { padding-bottom: $value !important; }
  .pl-#{$size} { padding-left: $value !important; }
  .px-#{$size} { padding-left: $value !important; padding-right: $value !important; }
  .py-#{$size} { padding-top: $value !important; padding-bottom: $value !important; }
  
  // Gap
  .gap-#{$size} { gap: $value !important; }
  .gap-x-#{$size} { column-gap: $value !important; }
  .gap-y-#{$size} { row-gap: $value !important; }
}

// 负间距
.mt-n1 { margin-top: -4px !important; }
.mt-n2 { margin-top: -8px !important; }
.mt-n3 { margin-top: -12px !important; }
.mt-n4 { margin-top: -16px !important; }

.mb-n1 { margin-bottom: -4px !important; }
.mb-n2 { margin-bottom: -8px !important; }
.mb-n3 { margin-bottom: -12px !important; }
.mb-n4 { margin-bottom: -16px !important; }

// 显示工具类
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }
.d-flex { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }
.d-grid { display: grid !important; }

// Flexbox 工具类
.flex-row { flex-direction: row !important; }
.flex-row-reverse { flex-direction: row-reverse !important; }
.flex-column { flex-direction: column !important; }
.flex-column-reverse { flex-direction: column-reverse !important; }

.flex-wrap { flex-wrap: wrap !important; }
.flex-nowrap { flex-wrap: nowrap !important; }
.flex-wrap-reverse { flex-wrap: wrap-reverse !important; }

.flex-fill { flex: 1 1 auto !important; }
.flex-grow-0 { flex-grow: 0 !important; }
.flex-grow-1 { flex-grow: 1 !important; }
.flex-shrink-0 { flex-shrink: 0 !important; }
.flex-shrink-1 { flex-shrink: 1 !important; }

.justify-start { justify-content: flex-start !important; }
.justify-end { justify-content: flex-end !important; }
.justify-center { justify-content: center !important; }
.justify-between { justify-content: space-between !important; }
.justify-around { justify-content: space-around !important; }
.justify-evenly { justify-content: space-evenly !important; }

.align-start { align-items: flex-start !important; }
.align-end { align-items: flex-end !important; }
.align-center { align-items: center !important; }
.align-baseline { align-items: baseline !important; }
.align-stretch { align-items: stretch !important; }

.align-content-start { align-content: flex-start !important; }
.align-content-end { align-content: flex-end !important; }
.align-content-center { align-content: center !important; }
.align-content-between { align-content: space-between !important; }
.align-content-around { align-content: space-around !important; }
.align-content-stretch { align-content: stretch !important; }

.align-self-auto { align-self: auto !important; }
.align-self-start { align-self: flex-start !important; }
.align-self-end { align-self: flex-end !important; }
.align-self-center { align-self: center !important; }
.align-self-baseline { align-self: baseline !important; }
.align-self-stretch { align-self: stretch !important; }

// 位置工具类
.position-static { position: static !important; }
.position-relative { position: relative !important; }
.position-absolute { position: absolute !important; }
.position-fixed { position: fixed !important; }
.position-sticky { position: sticky !important; }

// 定位工具类
.top-0 { top: 0 !important; }
.top-50 { top: 50% !important; }
.top-100 { top: 100% !important; }

.bottom-0 { bottom: 0 !important; }
.bottom-50 { bottom: 50% !important; }
.bottom-100 { bottom: 100% !important; }

.start-0 { left: 0 !important; }
.start-50 { left: 50% !important; }
.start-100 { left: 100% !important; }

.end-0 { right: 0 !important; }
.end-50 { right: 50% !important; }
.end-100 { right: 100% !important; }

.translate-middle { transform: translate(-50%, -50%) !important; }
.translate-middle-x { transform: translateX(-50%) !important; }
.translate-middle-y { transform: translateY(-50%) !important; }

// 溢出工具类
.overflow-auto { overflow: auto !important; }
.overflow-hidden { overflow: hidden !important; }
.overflow-visible { overflow: visible !important; }
.overflow-scroll { overflow: scroll !important; }

.overflow-x-auto { overflow-x: auto !important; }
.overflow-x-hidden { overflow-x: hidden !important; }
.overflow-x-visible { overflow-x: visible !important; }
.overflow-x-scroll { overflow-x: scroll !important; }

.overflow-y-auto { overflow-y: auto !important; }
.overflow-y-hidden { overflow-y: hidden !important; }
.overflow-y-visible { overflow-y: visible !important; }
.overflow-y-scroll { overflow-y: scroll !important; }

// 字体权重工具类
.fw-light { font-weight: var(--font-weight-light) !important; }
.fw-normal { font-weight: var(--font-weight-normal) !important; }
.fw-medium { font-weight: var(--font-weight-medium) !important; }
.fw-semibold { font-weight: var(--font-weight-semibold) !important; }
.fw-bold { font-weight: var(--font-weight-bold) !important; }
.fw-extrabold { font-weight: var(--font-weight-extrabold) !important; }

// 字体大小工具类
.fs-xs { font-size: var(--font-size-xs) !important; }
.fs-sm { font-size: var(--font-size-sm) !important; }
.fs-base { font-size: var(--font-size-base) !important; }
.fs-md { font-size: var(--font-size-md) !important; }
.fs-lg { font-size: var(--font-size-lg) !important; }
.fs-xl { font-size: var(--font-size-xl) !important; }
.fs-2xl { font-size: var(--font-size-2xl) !important; }
.fs-3xl { font-size: var(--font-size-3xl) !important; }
.fs-4xl { font-size: var(--font-size-4xl) !important; }
.fs-5xl { font-size: var(--font-size-5xl) !important; }
.fs-6xl { font-size: var(--font-size-6xl) !important; }

// 行高工具类
.lh-1 { line-height: 1 !important; }
.lh-sm { line-height: var(--line-height-tight) !important; }
.lh-base { line-height: var(--line-height-base) !important; }
.lh-lg { line-height: var(--line-height-relaxed) !important; }

// 文本装饰
.text-decoration-none { text-decoration: none !important; }
.text-decoration-underline { text-decoration: underline !important; }
.text-decoration-line-through { text-decoration: line-through !important; }

// 文本转换
.text-lowercase { text-transform: lowercase !important; }
.text-uppercase { text-transform: uppercase !important; }
.text-capitalize { text-transform: capitalize !important; }

// 字间距
.text-monospace { font-family: var(--font-family-mono) !important; }

// 文本省略
.text-truncate {
  @include text-ellipsis;
}

.text-break {
  @include text-break;
}

// 多行文本省略
.line-clamp-1 {
  @include text-ellipsis-multiline(1);
}

.line-clamp-2 {
  @include text-ellipsis-multiline(2);
}

.line-clamp-3 {
  @include text-ellipsis-multiline(3);
}

.line-clamp-4 {
  @include text-ellipsis-multiline(4);
}

.line-clamp-5 {
  @include text-ellipsis-multiline(5);
}

// 边框工具类
.border { border: 1px solid var(--border-base) !important; }
.border-0 { border: 0 !important; }

.border-top { border-top: 1px solid var(--border-base) !important; }
.border-top-0 { border-top: 0 !important; }

.border-end { border-right: 1px solid var(--border-base) !important; }
.border-end-0 { border-right: 0 !important; }

.border-bottom { border-bottom: 1px solid var(--border-base) !important; }
.border-bottom-0 { border-bottom: 0 !important; }

.border-start { border-left: 1px solid var(--border-base) !important; }
.border-start-0 { border-left: 0 !important; }

// 边框颜色
.border-primary { border-color: var(--primary-color) !important; }
.border-success { border-color: var(--success-color) !important; }
.border-warning { border-color: var(--warning-color) !important; }
.border-danger { border-color: var(--danger-color) !important; }
.border-info { border-color: var(--info-color) !important; }

.border-light { border-color: var(--border-light) !important; }
.border-lighter { border-color: var(--border-lighter) !important; }

// 圆角工具类
.rounded { border-radius: var(--border-radius-base) !important; }
.rounded-sm { border-radius: var(--border-radius-sm) !important; }
.rounded-md { border-radius: var(--border-radius-md) !important; }
.rounded-lg { border-radius: var(--border-radius-lg) !important; }
.rounded-xl { border-radius: var(--border-radius-xl) !important; }
.rounded-2xl { border-radius: var(--border-radius-2xl) !important; }
.rounded-3xl { border-radius: var(--border-radius-3xl) !important; }
.rounded-circle { border-radius: var(--border-radius-full) !important; }
.rounded-pill { border-radius: 50rem !important; }
.rounded-0 { border-radius: 0 !important; }

// 单独圆角
.rounded-top { border-top-left-radius: var(--border-radius-base) !important; border-top-right-radius: var(--border-radius-base) !important; }
.rounded-end { border-top-right-radius: var(--border-radius-base) !important; border-bottom-right-radius: var(--border-radius-base) !important; }
.rounded-bottom { border-bottom-right-radius: var(--border-radius-base) !important; border-bottom-left-radius: var(--border-radius-base) !important; }
.rounded-start { border-bottom-left-radius: var(--border-radius-base) !important; border-top-left-radius: var(--border-radius-base) !important; }

// 阴影工具类
.shadow-none { box-shadow: none !important; }
.shadow-xs { box-shadow: var(--shadow-xs) !important; }
.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow { box-shadow: var(--shadow-base) !important; }
.shadow-md { box-shadow: var(--shadow-md) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }
.shadow-xl { box-shadow: var(--shadow-xl) !important; }
.shadow-2xl { box-shadow: var(--shadow-2xl) !important; }

// 光标工具类
.cursor-auto { cursor: auto !important; }
.cursor-default { cursor: default !important; }
.cursor-pointer { cursor: pointer !important; }
.cursor-wait { cursor: wait !important; }
.cursor-text { cursor: text !important; }
.cursor-move { cursor: move !important; }
.cursor-not-allowed { cursor: not-allowed !important; }

// 用户选择
.user-select-all { user-select: all !important; }
.user-select-auto { user-select: auto !important; }
.user-select-none { user-select: none !important; }

// 透明度工具类
.opacity-0 { opacity: 0 !important; }
.opacity-25 { opacity: 0.25 !important; }
.opacity-50 { opacity: 0.5 !important; }
.opacity-75 { opacity: 0.75 !important; }
.opacity-100 { opacity: 1 !important; }

// Z-index 工具类
.z-index-0 { z-index: var(--z-index-hide) !important; }
.z-index-1 { z-index: var(--z-index-base) !important; }
.z-index-2 { z-index: 2 !important; }
.z-index-3 { z-index: 3 !important; }

.z-index-dropdown { z-index: var(--z-index-dropdown) !important; }
.z-index-sticky { z-index: var(--z-index-sticky) !important; }
.z-index-fixed { z-index: var(--z-index-fixed) !important; }
.z-index-modal-backdrop { z-index: var(--z-index-modal-backdrop) !important; }
.z-index-modal { z-index: var(--z-index-modal) !important; }
.z-index-popover { z-index: var(--z-index-popover) !important; }
.z-index-tooltip { z-index: var(--z-index-tooltip) !important; }

// 可点击元素样式
.clickable {
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
  
  &:hover {
    opacity: 0.85;
    transform: translateY(-1px);
  }
  
  &:active {
    transform: translateY(0);
  }
}

// 卡片基础样式
.card {
  @include card-base;
  padding: var(--card-padding);
  margin-bottom: var(--spacing-6);
}

.card-shadow {
  @include card-shadow;
}

.card-hover {
  @include card-hover;
}

// 按钮基础样式
.btn {
  @include button-base;
  padding: var(--spacing-3) var(--spacing-6);
  font-size: var(--font-size-sm);
  border-radius: var(--border-radius-base);
  min-height: var(--component-height-base);
  
  &.btn-sm {
    padding: var(--spacing-2) var(--spacing-4);
    font-size: var(--font-size-xs);
    min-height: var(--component-height-sm);
    border-radius: var(--border-radius-sm);
  }
  
  &.btn-lg {
    padding: var(--spacing-4) var(--spacing-8);
    font-size: var(--font-size-md);
    min-height: var(--component-height-lg);
    border-radius: var(--border-radius-lg);
  }
}

// 状态徽章
.status-badge {
  @include status-badge(var(--primary-color));
  
  &.status-success {
    @include status-badge(var(--success-color));
  }
  
  &.status-warning {
    @include status-badge(var(--warning-color));
  }
  
  &.status-danger {
    @include status-badge(var(--danger-color));
  }
  
  &.status-info {
    @include status-badge(var(--info-color));
  }
}

// 空状态样式
.empty-container {
  @include flex-column-center;
  padding: var(--spacing-16) var(--spacing-8);
  min-height: 300px;
  color: var(--text-secondary);
  background-color: var(--bg-color);
  border: 2px dashed var(--border-lighter);
  border-radius: var(--border-radius-lg);
  
  .empty-icon {
    font-size: 64px;
    margin-bottom: var(--spacing-6);
    opacity: 0.3;
    color: var(--text-placeholder);
  }
  
  .empty-title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--spacing-3);
    color: var(--text-primary);
  }
  
  .empty-description {
    font-size: var(--font-size-base);
    text-align: center;
    max-width: 400px;
    line-height: var(--line-height-relaxed);
    margin-bottom: var(--spacing-6);
  }
  
  .empty-actions {
    display: flex;
    gap: var(--spacing-4);
    flex-wrap: wrap;
    justify-content: center;
  }
}

// 加载状态
.loading-container {
  @include flex-column-center;
  padding: var(--spacing-16);
  min-height: 200px;
  
  .loading-text {
    margin-top: var(--spacing-4);
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
  }
}

// 响应式工具类
@media (max-width: #{var(--breakpoint-xs)}) {
  .d-xs-none { display: none !important; }
  .d-xs-block { display: block !important; }
  .d-xs-flex { display: flex !important; }
}

@media (min-width: #{var(--breakpoint-sm)}) {
  .d-sm-none { display: none !important; }
  .d-sm-block { display: block !important; }
  .d-sm-flex { display: flex !important; }
}

@media (min-width: #{var(--breakpoint-md)}) {
  .d-md-none { display: none !important; }
  .d-md-block { display: block !important; }
  .d-md-flex { display: flex !important; }
}

@media (min-width: #{var(--breakpoint-lg)}) {
  .d-lg-none { display: none !important; }
  .d-lg-block { display: block !important; }
  .d-lg-flex { display: flex !important; }
}

@media (min-width: #{var(--breakpoint-xl)}) {
  .d-xl-none { display: none !important; }
  .d-xl-block { display: block !important; }
  .d-xl-flex { display: flex !important; }
}

// 混合器生成的工具类
@include utility-classes;

// 动画类
.animate-fade-in {
  animation: fadeIn var(--transition-normal) ease-in-out;
}

.animate-slide-up {
  animation: slideUp var(--transition-normal) ease-out;
}

.animate-slide-down {
  animation: slideDown var(--transition-normal) ease-out;
}

.animate-slide-left {
  animation: slideLeft var(--transition-normal) ease-out;
}

.animate-slide-right {
  animation: slideRight var(--transition-normal) ease-out;
}

.animate-scale-in {
  animation: scaleIn var(--transition-normal) ease-out;
}

.animate-bounce {
  animation: bounce 1s ease-in-out infinite;
}

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

// 动画关键帧
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideLeft {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideRight {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes bounce {
  0%, 20%, 53%, 80%, 100% {
    animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
    transform: translate3d(0, 0, 0);
  }
  40%, 43% {
    animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
    transform: translate3d(0, -30px, 0);
  }
  70% {
    animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
    transform: translate3d(0, -15px, 0);
  }
  90% {
    transform: translate3d(0, -4px, 0);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.7;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

// 特殊效果类
.hover-lift {
  transition: var(--transition-base);
  
  &:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
  }
}

.hover-scale {
  transition: var(--transition-base);
  
  &:hover {
    transform: scale(1.05);
  }
}

.hover-rotate {
  transition: var(--transition-base);
  
  &:hover {
    transform: rotate(5deg);
  }
}

// 渐变背景
.gradient-primary {
  @include gradient-primary;
  color: var(--text-inverse);
}

.gradient-success {
  @include gradient-success;
  color: var(--text-inverse);
}

.gradient-warning {
  @include gradient-warning;
  color: var(--text-inverse);
}

.gradient-danger {
  @include gradient-danger;
  color: var(--text-inverse);
}

// 玻璃态效果
.glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

// 遮罩层
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: var(--z-index-modal-backdrop);
  backdrop-filter: blur(4px);
}

// 滚动条美化类
.scrollbar-thin {
  @include scrollbar-thin;
}

// 响应式容器
.container {
  width: 100%;
  margin-right: auto;
  margin-left: auto;
  padding-right: var(--spacing-4);
  padding-left: var(--spacing-4);
  
  @media (min-width: #{var(--breakpoint-sm)}) {
    max-width: 540px;
  }
  
  @media (min-width: #{var(--breakpoint-md)}) {
    max-width: 720px;
  }
  
  @media (min-width: #{var(--breakpoint-lg)}) {
    max-width: 960px;
  }
  
  @media (min-width: #{var(--breakpoint-xl)}) {
    max-width: 1140px;
  }
}

.container-fluid {
  width: 100%;
  margin-right: auto;
  margin-left: auto;
  padding-right: var(--spacing-4);
  padding-left: var(--spacing-4);
}

// 网格系统
.row {
  display: flex;
  flex-wrap: wrap;
  margin-right: calc(var(--spacing-4) * -0.5);
  margin-left: calc(var(--spacing-4) * -0.5);
}

.col {
  flex: 1 0 0%;
  padding-right: calc(var(--spacing-4) * 0.5);
  padding-left: calc(var(--spacing-4) * 0.5);
}

// 响应式列
@each $breakpoint, $abbreviation in (xs, ''), (sm, sm), (md, md), (lg, lg), (xl, xl) {
  @if $abbreviation != '' {
    @media (min-width: #{var(--breakpoint-#{$breakpoint})}) {
      @for $i from 1 through 12 {
        .col-#{$abbreviation}-#{$i} {
          flex: 0 0 calc(100% / 12 * #{$i});
          max-width: calc(100% / 12 * #{$i});
          padding-right: calc(var(--spacing-4) * 0.5);
          padding-left: calc(var(--spacing-4) * 0.5);
        }
      }
    }
  }
}

// 响应式设计增强
@media (max-width: #{var(--breakpoint-sm)}) {
  .text-center-mobile {
    text-align: center !important;
  }
  
  .hide-mobile {
    display: none !important;
  }
  
  .mobile-full-width {
    width: 100% !important;
  }
  
  .mobile-stack {
    flex-direction: column !important;
  }
  
  .mobile-spacing-reduced {
    padding: var(--spacing-3) !important;
    margin: var(--spacing-3) 0 !important;
  }
}

// 打印样式
@media print {
  .no-print {
    display: none !important;
  }
  
  .print-only {
    display: block !important;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
  
  .card {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
  }
}

// 暗色模式增强
:root.dark {
  // 调整暗色模式下的特殊样式
  .glass {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .empty-container {
    background-color: var(--bg-color-tertiary);
    border-color: var(--border-light);
  }
  
  .overlay {
    background-color: rgba(0, 0, 0, 0.7);
  }
  
  // 调整文本颜色对比度
  .text-secondary {
    color: var(--text-secondary) !important;
  }
  
  // 调整边框颜色
  .border-light {
    border-color: var(--border-light) !important;
  }
}

// 高对比度模式支持
@media (prefers-contrast: high) {
  :root {
    --border-base: #000000;
    --border-light: #333333;
    --text-secondary: #000000;
  }
  
  :root.dark {
    --border-base: #FFFFFF;
    --border-light: #CCCCCC;
    --text-secondary: #FFFFFF;
  }
}

// 减少动画支持
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}